package com.lyz.controller;

import com.lyz.entity.User;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin("*")
public class UserController {
    @PostMapping("/user")
    public String showUser(@RequestBody User user){
        System.out.println("user = " + user);
        return "success";
    }
}
